<?php

$u = $this->getData('user');
$p = $u->getProfile();
$i = htmlspecialchars($p->getData('pic_small_with_logo'));

?>
<div id="widget-login" class="pull-right">
	<div class="username" title="<?=$this->T('Your profile')?>: <?=$u->getName()?>"><?=$this->getData('user')->getName()?></div>
	<div class="profile">
		<div style="float:left;margin-right:15px;">
			<img src="<?=$i?>" class="img-rounded" width="50" height="50" />
		</div>
		<div>
			<a class="btn btn-mini" href="/login/logout" title="<?=$this->T('Logout')?>">
				<i class='icon-share-alt'></i> <?=$this->T('Logout')?>
			</a>
			<a class="btn btn-mini" href="/profile/edit" title="<?=$this->T('Edit')?>">
				<i class='icon-pencil'></i> <?=$this->T('Edit')?>
			</a>
		</div>
		<hr />
	</div>
	<a class="btn btn-mini" href="/login/logout" title="<?=$this->T('Logout')?>">
		<i class='icon-share-alt'></i>
	</a>
	<script>
	$(document).ready(function() {
		$('#widget-login div.username').popover({
			html : true,
			content : $('#widget-login div.profile').html(),
			placement : 'bottom',
			title : 'Title'
		});
	});
	</script>
</div>